package kaka.controls.datagrid
{
	/**
	 * 功能：用于根据传入参数生成相应类型的DataGrid表格列
	 * @param  showID     对应的字段名参数
	 * @param  showItems  表格显示名和字段集合
	 **/	
	import kaka.controls.datagrid.ColumnInfo;
	import kaka.controls.datagrid.IColumn;
	
	import flash.events.Event;
	import flash.events.MouseEvent;
	
	import mx.controls.Alert;
	import mx.controls.dataGridClasses.DataGridColumn;
	import mx.core.ClassFactory;
	import mx.core.IFactory;

	public class SuperDataGridColumn extends DataGridColumn
	{
		
		public function SuperDataGridColumn()
		{
			super();
		}
		private var showID:int=-1;
		private var showItems:Array;
		public function initData(_id:int,_column:IColumn):void
		{
			showID=_id;
			showItems=_column.getShowItem();
			//填充每一列信息
			setdataField(showItems[showID]);
		}
		public function setdataField(value:ColumnInfo):void
		{
			this.dataField=value.datafield;
			this.headerText=value.headertext;
			this.itemRenderer=value.itemRenderer;
		}
	}
}